/**
 * 
 */
package project;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * @author Aarni
 * 
 */
public class Reader {

	public List<Data> readData() {

		/*
		 * List<Data> listaTest = Arrays.asList(new Data[] { new Data(1115,
		 * "aaaa"), new Data(1115, "bbbb"), new Data(1115, "xxxx"), new
		 * Data(1115, "ccc"), new Data(1115, "aaaa"), new Data(1115, "bbbb"),
		 * new Data(1116, "xxxx"), new Data(1116, "ccc"), new Data(1119, "ccc"),
		 * new Data(1119, "ddd")}); return listaTest;
		 */

		Conn conectare = new Conn();
		conectare.conectare();
		conectare.IntoarceDate();
		conectare.IntoarceValori();
		conectare.deconectare();

		List<Data> result = new ArrayList<Data>();
		for (int i = 0; i < conectare.date.size(); i++) {
			result.add(new Data(conectare.valori.get(i), conectare.date.get(i)));
		}

		return result;

	}

}
